
<html>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> 
<head>
 <link rel='stylesheet' type='text/css' href='../../../../global-themis/css/themisstyle.css'/>
<script>
function OuvrirPopup(page) {
      window.open(page, "comments", "toolbar=no, status=yes, scrollbars=yes, resizable=yes, width=1230, height=600");
}
</script>
<script src="../../../../global-themis/js/jquery.js"></script>
<script src="../../../../global-themis/js/jquery.tablescroll.js"></script>
<link rel='stylesheet' type='text/css' href='../../../../global-themis/css/themisstyle.css'/>				
<script>
	$(document).ready(function(){
		$('#mouv_att').tableScroll('undo');
	});

</script>

		
<?php
include ("../../../../PCO.php");
include ("../../../../global-themis/functions/function_graph_2.php");
include ("../../../../global-themis/functions/functions.php");
include ("../../../../global-themis/Classes/client.class");
$rem=array();
$num_cli="";
$content="";
$count="";
if(isset($_GET['num_cli'])){
	$num_cli=$_GET['num_cli'];
	if(strlen($num_cli)==6)
	$num_cli="0".$num_cli."";
	$client= new Client();
	$client->setNum($num_cli);
	$rem=$client->getMouvEnAttente($num_cli);
	$count=count($rem);
	if($count < 6) {
		$count=6 -$count;
	}
	else {
		$count=0;
	}
	if(empty($rem)){
		$content.="<table><tr><td>Aucun mouvement en attente...</td></tr></table>";
	}
	else {

		$content.="<table id='mouv_att' class='tablescroll' width='100%'>
				   <thead>
					   <td>CPT</td>
					   <td>A/R</td>
					   <td>Type OP</td>
					   <td>Num OP</td>
					   <td>ORIG</td>
					</thead>
					<tbody>";
		foreach($rem as $r){
			if(trim($r['REA'])==""){
				$r['REA']="-";
			}
			$content.="<tr><td>".$r['CPT']."<td>".$r['REA']."<td>".$r['COP']."<td>".$r['NOP']."<td>".$r['ORI']."</td>";
		}
		$i=0;
		while ($i<$count){
			$content.='<tr><td colspan="5">&nbsp;</td></tr>';
			$i++;
		}
		$content.="</tbody></table>";
	}
}
?>

</head>
<body>
<div>
<p>10 derniers mouvements en attente:</p>
<div id='container'>
	<?php
		echo $content;
	?>
</div>
</body>
</html>